Optimal. Leaf size=125 \[ -\frac {4 a^3 (A-i B)}{7 c^7 f (i+\tan (e+f x))^7}-\frac {2 a^3 (i A+2 B)}{3 c^7 f (i+\tan (e+f x))^6}+\frac {a^3 (A-5 i B)}{5 c^7 f (i+\tan (e+f x))^5}+\frac {a^3 B}{4 c^7 f (i+\tan (e+f x))^4} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.12, antiderivative size = 125, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 41, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.049, Rules used = {3669, 78}
\begin {gather*} \frac {a^3 (A-5 i B)}{5 c^7 f (\tan (e+f x)+i)^5}-\frac {2 a^3 (2 B+i A)}{3 c^7 f (\tan (e+f x)+i)^6}-\frac {4 a^3 (A-i B)}{7 c^7 f (\tan (e+f x)+i)^7}+\frac {a^3 B}{4 c^7 f (\tan (e+f x)+i)^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 78
Rule 3669
Rubi steps
\begin {align*} \int \frac {(a+i a \tan (e+f x))^3 (A+B \tan (e+f x))}{(c-i c \tan (e+f x))^7} \, dx &=\frac {(a c) \text {Subst}\left (\int \frac {(a+i a x)^2 (A+B x)}{(c-i c x)^8} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {(a c) \text {Subst}\left (\int \left (\frac {4 a^2 (A-i B)}{c^8 (i+x)^8}+\frac {4 a^2 (i A+2 B)}{c^8 (i+x)^7}-\frac {a^2 (A-5 i B)}{c^8 (i+x)^6}-\frac {a^2 B}{c^8 (i+x)^5}\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=-\frac {4 a^3 (A-i B)}{7 c^7 f (i+\tan (e+f x))^7}-\frac {2 a^3 (i A+2 B)}{3 c^7 f (i+\tan (e+f x))^6}+\frac {a^3 (A-5 i B)}{5 c^7 f (i+\tan (e+f x))^5}+\frac {a^3 B}{4 c^7 f (i+\tan (e+f x))^4}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 2.53, size = 143, normalized size = 1.14 \begin {gather*} -\frac {i a^3 (252 A+35 (10 A+i B) \cos (2 (e+f x))+20 (5 A+2 i B) \cos (4 (e+f x))-70 i A \sin (2 (e+f x))+175 B \sin (2 (e+f x))-40 i A \sin (4 (e+f x))+100 B \sin (4 (e+f x))) (\cos (10 e+13 f x)+i \sin (10 e+13 f x))}{6720 c^7 f (\cos (f x)+i \sin (f x))^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.66, size = 89, normalized size = 0.71
method | result | size |
derivativedivides | \(\frac {a^{3} \left (-\frac {5 i B -A}{5 \left (i+\tan \left (f x +e \right )\right )^{5}}+\frac {B}{4 \left (i+\tan \left (f x +e \right )\right )^{4}}-\frac {4 i A +8 B}{6 \left (i+\tan \left (f x +e \right )\right )^{6}}-\frac {-4 i B +4 A}{7 \left (i+\tan \left (f x +e \right )\right )^{7}}\right )}{f \,c^{7}}\) | \(89\) |
default | \(\frac {a^{3} \left (-\frac {5 i B -A}{5 \left (i+\tan \left (f x +e \right )\right )^{5}}+\frac {B}{4 \left (i+\tan \left (f x +e \right )\right )^{4}}-\frac {4 i A +8 B}{6 \left (i+\tan \left (f x +e \right )\right )^{6}}-\frac {-4 i B +4 A}{7 \left (i+\tan \left (f x +e \right )\right )^{7}}\right )}{f \,c^{7}}\) | \(89\) |
risch | \(-\frac {a^{3} {\mathrm e}^{14 i \left (f x +e \right )} B}{224 c^{7} f}-\frac {i a^{3} {\mathrm e}^{14 i \left (f x +e \right )} A}{224 c^{7} f}-\frac {{\mathrm e}^{12 i \left (f x +e \right )} B \,a^{3}}{96 c^{7} f}-\frac {i {\mathrm e}^{12 i \left (f x +e \right )} A \,a^{3}}{48 c^{7} f}-\frac {3 i A \,a^{3} {\mathrm e}^{10 i \left (f x +e \right )}}{80 c^{7} f}+\frac {{\mathrm e}^{8 i \left (f x +e \right )} B \,a^{3}}{64 c^{7} f}-\frac {i {\mathrm e}^{8 i \left (f x +e \right )} A \,a^{3}}{32 c^{7} f}+\frac {a^{3} {\mathrm e}^{6 i \left (f x +e \right )} B}{96 c^{7} f}-\frac {i a^{3} {\mathrm e}^{6 i \left (f x +e \right )} A}{96 c^{7} f}\) | \(196\) |
norman | \(\frac {\frac {A \,a^{3} \tan \left (f x +e \right )}{c f}+\frac {-44 i A \,a^{3}+5 B \,a^{3}}{420 c f}+\frac {B \,a^{3} \left (\tan ^{10}\left (f x +e \right )\right )}{4 c f}+\frac {2 \left (-125 i B \,a^{3}+139 A \,a^{3}\right ) \left (\tan ^{5}\left (f x +e \right )\right )}{15 c f}-\frac {6 \left (-85 i B \,a^{3}+36 A \,a^{3}\right ) \left (\tan ^{7}\left (f x +e \right )\right )}{35 c f}+\frac {\left (-10 i B \,a^{3}+A \,a^{3}\right ) \left (\tan ^{9}\left (f x +e \right )\right )}{5 c f}-\frac {2 \left (-5 i B \,a^{3}+16 A \,a^{3}\right ) \left (\tan ^{3}\left (f x +e \right )\right )}{3 c f}-\frac {5 \left (4 i A \,a^{3}+17 B \,a^{3}\right ) \left (\tan ^{8}\left (f x +e \right )\right )}{12 c f}+\frac {5 \left (16 i A \,a^{3}+23 B \,a^{3}\right ) \left (\tan ^{6}\left (f x +e \right )\right )}{6 c f}-\frac {\left (172 i A \,a^{3}+95 B \,a^{3}\right ) \left (\tan ^{4}\left (f x +e \right )\right )}{10 c f}+\frac {\left (256 i A \,a^{3}+35 B \,a^{3}\right ) \left (\tan ^{2}\left (f x +e \right )\right )}{60 c f}}{c^{6} \left (1+\tan ^{2}\left (f x +e \right )\right )^{7}}\) | \(316\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: RuntimeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 1.47, size = 109, normalized size = 0.87 \begin {gather*} -\frac {30 \, {\left (i \, A + B\right )} a^{3} e^{\left (14 i \, f x + 14 i \, e\right )} + 70 \, {\left (2 i \, A + B\right )} a^{3} e^{\left (12 i \, f x + 12 i \, e\right )} + 252 i \, A a^{3} e^{\left (10 i \, f x + 10 i \, e\right )} + 105 \, {\left (2 i \, A - B\right )} a^{3} e^{\left (8 i \, f x + 8 i \, e\right )} + 70 \, {\left (i \, A - B\right )} a^{3} e^{\left (6 i \, f x + 6 i \, e\right )}}{6720 \, c^{7} f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 379 vs. \(2 (104) = 208\).
time = 0.87, size = 379, normalized size = 3.03 \begin {gather*} \begin {cases} \frac {- 396361728 i A a^{3} c^{28} f^{4} e^{10 i e} e^{10 i f x} + \left (- 110100480 i A a^{3} c^{28} f^{4} e^{6 i e} + 110100480 B a^{3} c^{28} f^{4} e^{6 i e}\right ) e^{6 i f x} + \left (- 330301440 i A a^{3} c^{28} f^{4} e^{8 i e} + 165150720 B a^{3} c^{28} f^{4} e^{8 i e}\right ) e^{8 i f x} + \left (- 220200960 i A a^{3} c^{28} f^{4} e^{12 i e} - 110100480 B a^{3} c^{28} f^{4} e^{12 i e}\right ) e^{12 i f x} + \left (- 47185920 i A a^{3} c^{28} f^{4} e^{14 i e} - 47185920 B a^{3} c^{28} f^{4} e^{14 i e}\right ) e^{14 i f x}}{10569646080 c^{35} f^{5}} & \text {for}\: c^{35} f^{5} \neq 0 \\\frac {x \left (A a^{3} e^{14 i e} + 4 A a^{3} e^{12 i e} + 6 A a^{3} e^{10 i e} + 4 A a^{3} e^{8 i e} + A a^{3} e^{6 i e} - i B a^{3} e^{14 i e} - 2 i B a^{3} e^{12 i e} + 2 i B a^{3} e^{8 i e} + i B a^{3} e^{6 i e}\right )}{16 c^{7}} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 453 vs. \(2 (107) = 214\).
time = 1.17, size = 453, normalized size = 3.62 \begin {gather*} -\frac {2 \, {\left (105 \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{13} + 420 i \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{12} - 105 \, B a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{12} - 2170 \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{11} - 70 i \, B a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{11} - 5180 i \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{10} + 875 \, B a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{10} + 11431 \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{9} + 700 i \, B a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{9} + 15904 i \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{8} - 2380 \, B a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{8} - 19436 \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{7} - 1340 i \, B a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{7} - 15904 i \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{6} + 2380 \, B a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{6} + 11431 \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} + 700 i \, B a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} + 5180 i \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 875 \, B a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 2170 \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 70 i \, B a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 420 i \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 105 \, B a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 105 \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}}{105 \, c^{7} f {\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + i\right )}^{14}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 9.30, size = 151, normalized size = 1.21 \begin {gather*} \frac {\frac {a^3\,\left (44\,A+B\,5{}\mathrm {i}\right )}{420}+\frac {a^3\,\mathrm {tan}\left (e+f\,x\right )\,\left (35\,B+A\,112{}\mathrm {i}\right )}{420}-\frac {B\,a^3\,{\mathrm {tan}\left (e+f\,x\right )}^3}{4}-\frac {a^3\,{\mathrm {tan}\left (e+f\,x\right )}^2\,\left (84\,A-B\,105{}\mathrm {i}\right )}{420}}{c^7\,f\,\left (-{\mathrm {tan}\left (e+f\,x\right )}^7-{\mathrm {tan}\left (e+f\,x\right )}^6\,7{}\mathrm {i}+21\,{\mathrm {tan}\left (e+f\,x\right )}^5+{\mathrm {tan}\left (e+f\,x\right )}^4\,35{}\mathrm {i}-35\,{\mathrm {tan}\left (e+f\,x\right )}^3-{\mathrm {tan}\left (e+f\,x\right )}^2\,21{}\mathrm {i}+7\,\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________